﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using MvcFilters.Filters;

namespace PlanificadorDeEventos.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        #region Métodos públicos
        [TraceFilter]
        [LogErrors]
        public ActionResult Index()
        {
            ViewBag.Message = "Fácil, rápido y seguro... la mejor manera de planificar tus eventos.";
            if (Roles.GetRolesForUser(System.Web.HttpContext.Current.User.Identity.Name).Contains("Admin"))
                ViewBag.isAdmin = true;
            else
                ViewBag.isAdmin = false;
            return View();
        }

        [TraceFilter]
        [LogErrors]
        public ActionResult Contact()
        {
            return View();
        }
        #endregion
    }
}
